﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Owin;
using Autofac;
using Autofac.Integration.Owin;
using System.Web;

namespace AutofacOwinDemo
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        public ITest Test { get; set; }

        protected void Page_PreInit(object sender, EventArgs e)
        {
            var owin = this.Context.Request.GetOwinContext() ;
            var scop = owin.GetAutofacLifetimeScope();
            scop.InjectProperties(this);
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}